/* 
 * Arcms基于J2EE架构内容管理系统
 * Copyright © Zrar Co., Ltd. All rights reserved.
 * Department：运营部
 * 更多信息，请visit:
 * http://www.zrar.com/arcms
 */
package org.grayrabbit.cms.dao.user; 

import java.util.List;

import org.grayrabbit.cms.entity.User;
import org.grayrabbit.cms.vo.user.UserBean;
import org.grayrabbit.dao.GenericDao;
import org.grayrabbit.dao.util.Page;
import org.grayrabbit.dao.util.QueryCondition;

/**
 * <b>User</b>的DAO接口
 * @author <a href="mailto:shenyongsheng@zrar.com">sys53</a> 
 * @version 1.0,创建时间:2011-05-16 16:04:46 
 */
public interface UserDao extends GenericDao<User, String>{
	
	/**
	 * 根据bean组装查询条件
	 */
	public QueryCondition assembly(UserBean bean);
	/**
	 * 根据bean组装统计查询条件
	 */
	public QueryCondition assemblyCount(UserBean bean);
	public int count(UserBean bean);
	/**
	 * 根据bean组装查询条件(名称参数)
	 */
	public QueryCondition assermblyNameQuery(UserBean bean);
	
	/**
	 * 根据bean组装统计查询条件(名称参数)
	 */
	public QueryCondition assemblyNameQueryCount(UserBean bean);
	/**
	 * 填充分页组件
	 * @param page
	 * @param bean
	 */
	public List<User> findByPage(Page<User> page, UserBean bean);
	/**
	 * 检查登录名唯一性
	 * @param userLoginName
	 * @return
	 */
	public boolean checkNameUnique(String userLoginName,String userId);
	
	/**
	 * 根据用户名获取用户
	 * @param userLoginName
	 * @return
	 */
	public List<User> getUserByLoginName(String userLoginName);
	/**
	 * 根据用户邮箱获取用户
	 * @param email
	 * @return
	 */
	public List<User> getUserByEmail(String email);
}